package org.huel.backend.service;

import org.huel.backend.domain.entity.User;
import org.huel.backend.result.Result;
import org.springframework.security.core.userdetails.UserDetails;

/**
 * @author Liweijian.
 * @Description TODO
 * @date 2024/11/30 10:13
 */
public interface UserService {
    Result login(User user);


    UserDetails loadUserByUsername(String studentId);


    User getUserByStudentId(String studentId);

    /**
     * 用户注册
     * @param request 注册请求
     * @return 注册的用户
     */
    User register(User request);

    /**
     * 检查学号是否已存在
     * @param studentId 学号
     * @return 是否存在
     */
    boolean checkStudentIdExists(String studentId);
}
